const arr = [1, 2, 3];

console.log(arr.reduce((p1, p2) => {
  console.log('p1:', p1); //p1: 1 //p1: 3
  console.log('p2:', p2); //p1: 3 //p2: 3
  return p1 + p2;
})); //6


